package com.ssy.lingxi.purchase.api.common;

/**
 * 订单常量
 *
 * @author wrc
 * @date 2020/7/7
 */
public class OrderConstant {
    /**
    * 订单下单模式ID枚举
     * 5.进货单下单
     * 6.手工下单
     * 7.询价报价下单
     * 8.需求报价下单
     * 9.合并订单下单
     * 10.渠道直采进货单下单
     * 11.渠道直采手工下单
     * 12.渠道现货进货单下单
     * 13.渠道现货手工下单
     * 24.积分下单
     * 25.渠道积分下单
    * @author wrc
    * @date 2020/11/19
    */
    public interface  OrderModel{
        Long PURCHASE_ORDER = 5L;
        Long ORDER_HAND = 6L;
        Long INQUIRY_QUOTATION_ORDER = 7L;
        Long DEMAND_QUOTATION_ORDER = 8L;
        Long CONSOLIDATED_ORDER_PLACEMENT = 9L;
        Long CHANNEL_ORDER = 10L;
        Long CHANNEL_ORDER_HAND = 11L;
        Long CHANNEL_PURCHASE_ORDER = 12L;
        Long CHANNEL_SPOT_MANUAL_ORDER = 13L;
        Long POINTS_EXCHANGE = 24L;
        Long CHANNEL_POINTS_EXCHANGE = 25L;


    }

    /**
    * 流程类型：1.订单交易流程 2.售后换货流程 3.售后退货流程 4.售后维修流程
    * @author wrc
    * @date 2020/12/4
    */
    public interface  OrderWorkType{
        Integer ORDER_TYPE = 1;
        Integer AFTER_SALE_EXCHANGE_PROCESS = 2;
        Integer AFTER_SALES_RETURN_PROCESS = 3;
        Integer AFTER_SALES_MAINTENANCE_PROCESS = 4;

    }

    /**
     * 查询类型：1.报价单查询 2. 待新增报价单查询 3.待审核报价单（(一级)） 4.待审核报价单（(二级)） 5.待提交报价单
     *
     * @author wrc
     * @date 2020/7/31
     */
    public interface QueryType {
        int QUOTATION_INQUIRY = 1;
        int TO_BE_ADDED_TO_THE_QUOTATION_INQUIRY = 2;
        int QUOTATION_TO_BE_REVIEWED_ONE = 3;
        int QUOTATION_TO_BE_REVIEWED_TWO = 4;
        int QUOTATION_TO_BE_SUBMITTED = 5;
        int PRODUCT_QUOTATION_TO_BE_SUBMITTED = 6;
        int ELECTRONIC_CONTRACTS = 7;
        int CURRENT_PAYMENTS = 8;
        int TO_BE_DELIVERED = 9;
        //待新增采购入库单
        int LIST_PURCHASE_RECEIPT_ADDED = 10;
        //待归档订单
        int ORDER_TO_BE_FILED = 11;
        //待归档订单
        int ORDER_SUPPLIER_FILED = 13;

        //待评价订单
        int ORDER_EVALUATED_LIST = 14;
    }

    /**
     * 商品类型: 1-会员商品; 2-渠道商品
     *
     * @author wrc
     * @date 2020/7/31
     */
    public interface CommodityType {
        int MEMBER_PRODUCT = 1;
        int CHANNEL_PRODUCT = 2;
    }

    /**
     * 是否所有会员共享
     *
     * @author wrc
     * @date 2020/7/8
     */
    public interface IsTacitlyApprove {
        int YES = 1;
        int NOT = 2;
    }

    /**
     * 订单服务状态：1.启用 0.停用
     *
     * @author wrc
     * @date 2020/7/9
     */
    public interface State {
        Integer STOP = 0;
        Integer START = 1;

    }


    /**
     * 物流单审核：0-不接受 1-接受  2-待确认
     * @author wrc
     * @date 2020/7/9
     */
    public interface LogisticsType {
        Integer NOT = 0;
        Integer YES = 1;
        Integer CONFIRM = 2;
    }

    /**
     * 任务类型，定义在TaskTypeEnum中。 0-普通任务 1-支付任务
     *
     * @author wrc
     * @date 2020/7/9
     */
    public interface TaskType {
        int ORDINARY = 0;
        int PAY = 1;

    }

    /**
     * 审核状态：
     *
     * @author wrc
     * @date 2020/7/9
     */
    public interface Auditing {
        int NOT_GO = 0;
        int PASS = 1;
        int DEFAULT = -1;
        int TWO = 2;
        int THREE = 3;
    }

    /**
     * 需求单查询类型：1.查询全部状态需求单 2.查询新增需求单 3. 查询待审核需求单1级 4.查询待审核需求单2级 5.待提交需求单
     *
     * @author wrc
     * @date 2020/7/9
     */
    public interface RequisitionFormType {
        int ALL = 1;
        int ADD = 2;
        int TO_AUDIT_ONE = 3;
        int TO_AUDIT_TWO = 4;
        int TO_BE_SUBMITTED = 5;
    }


    /**
     * 需求对接类型：1.发布至平台 2.系统匹配 3.指定会员
     *
     * @author wrc
     * @date 2020/7/9
     */
    public interface DemandType {
        int PUBLISH_TO_PLATFORM = 1;
        int SYSTEM_MATCHING = 2;
        int ASSIGN_MEMBER = 3;

    }


    /**
     * 需求对接类型：1.发布至平台 2.系统匹配 3.指定会员
     *
     * @author wrc
     * @date 2020/7/9
     */
    public interface RequisitionFormSendState {
        int NOT_SEND = 1;
        int ALREADY_SEND = 2;
        int THE_SPECIFIED_MEMBER = 3;


    }

    /**
     * 内部状态:1.待提交审核  2.待审核(一级)   3.待审核(二级)  6.审核不通过  7.审核通过 8.审核不通过
     *
     * @author wrc
     * @date 2020/7/22
     */
    public interface InteriorState {
        Integer PENDING_REVIEW = 1;
        Integer TO_AUDIT_ONE = 2;
        Integer TO_AUDIT_TWO = 3;
        Integer TO_AUDIT_THREE = 4;
        Integer FAILED_TO_PASS_THE_AUDIT = 5;
        Integer NOT_APPROVED_PRODUCT = 6;
        Integer PASS_THE_AUDIT = 7;
        Integer NOT_APPROVED = 8;
    }

    /**
     * 工作流审核状态:1.通过 0.不通过 -1.默认
     *
     * @author wrc
     * @date 2020/7/22
     */
    public interface InteriorStatus {
        int STATE_PASS = 1;
        int STATE_NOT_PASS = 0;
        int STATE_DEFAULT = -1;
    }


    /**
     * 外部状态:1.提交需求单 2.审核需求单 3.提交报价单 4.确认报价单 5.审核通过 6.审核不通过 7.不接受报价 8.等待确认报价
     *
     * @author wrc
     * @date 2020/7/22
     */
    public interface ExternalState {
        int REQUISITION_TO_BE_SUBMITTED = 1;
        int AUDIT_REQUISITION = 2;
        int QUOTATION_SUBMISSION = 3;
        int CONFIRMATION_QUOTATION = 4;
        Integer PASS_THE_AUDIT = 5;
        int THE_REQUIREMENT_SHEET_IS_NOT_APPROVED = 6;
        int NO_OFFER_ACCEPTED = 7;
        int WAITING_FOR_CONFIRMATION_OFFER = 8;

    }

    /**
     * 报价单内部流转: 1.新增报价单 2.审核报价单 3.审核报价单 4.提交报价单 5.审核不通过
     *
     * @author wrc
     * @date 2020/7/30
     */
    public interface InternalStateOfQuotation {
        int NEW_QUOTATION = 1;
        int REVIEW_QUOTATION = 2;
        int REVIEW_QUOTATION_TWO = 3;
        int QUOTATION_SUBMISSION = 4;
        int NOT_APPROVED = 5;
    }

    /**
     * 5、下单模式为进货单下单：订单类型为现货采购 3
     * 6、下单模式为手工下单：订单类型为现货采购 3
     * 7、询价报价下单 ：订单类型为询价采购 1
     * 8、下单模式为需求报价下单：订单类型为需求采购 2
     * 9、下单模式为合并订单下单：订单类型为集采 4
     * 10.下单模式为渠道直采进货单下单：订单类型为渠道直采 5
     * 11、下单模式为渠道直采手工下单：订单类型为渠道直采 5
     * 12、下单模式为渠道现货进货单下单：订单类型为渠道现货 6
     * 13、下单模式为渠道现货手工下单：订单类型为渠道现货 6
     * 24、下单模式为积分兑换订单下单：订单类型为积分兑换 7
     * 25、下单模式为渠道积分兑换订单下单：订单类型为渠道积分兑换 8
     */
    public interface OrderType {
        //订单类型为询价采购
        int INQUIRY_TO_PURCHASE = 1;
        //订单类型为需求采购
        int NEED_TO_PURCHASE = 2;
        //订单类型为现货采购
        int SPOT_PURCHASING = 3;
        //订单类型为集采
        int COLLECTIVE_PURCHASE = 4;
        //订单类型为渠道直采
        int CHANNEL_STRAIGHT_MINING = 5;
        //订单类型为渠道现货
        int CHANNEL_SPOT = 6;
        //订单类型为积分兑换
        int CREDITS_EXCHANGE = 7;
        //订单类型为渠道积分兑换
        int CHANNEL_POINT_EXCHANGE = 8;

    }


    /**
     * 配送方式
     *
     * @author wrc
     * @date 2020/8/26
     */
    public interface DeliveryType {
        //物流
        Integer LOGISTICS = 1;
        //自提
        Integer PICK_UP_ADDRESS = 2;
        //无配送
        Integer NO_DELIVERY = 3;

    }


    /**
     * 支付渠道ID枚举
     *
     * @author wrc
     * @date 2020/8/26
     */
    public interface PayWayId {
        //支付宝
        Long ALI_PAY = 1L;
        //微信
        Long WX_PAY = 2L;
        //银联
        Long UNIONPAY_PAY = 3L;
        //余额支付
        Long REMAINING_PAY = 4L;
        //线下支付
        Long OFFLINE_PAY = 5L;
        //授信额度
        Long CREDIT_LINE_PAY = 6L;
        //货到付款
        Long COD_PAY = 7L;

        //积分兑换
        Long POINTS_EXCHANGE = 0L;


    }

    /**
     * 订单内部支付状态
     *
     * @author wrc
     * @date 2020/8/26
     */
    public interface PayState {
        //待确认电子合同
        Integer ELECTRONIC_CONTRACT_TO_BE_CONFIRMED = 5;
        //确认电子合同
        Integer CONFIRMATION_ELECTRONIC_CONTRACT = 8;
        //取消电子合同
        Integer CANCEL_ELECTRONIC_CONTRACT = 9;

        //支付成功
        Integer PAYMENT_SUCCESS = 10;

        //支付失败
        Integer PAYMENT_FAILED = 11;

        //确认收货
        Integer CONFIRM_RECEIPT = 12;

        //取消收货
        Integer CANCEL_RECEIVING = 13;

        //订单入库
        Integer ORDER_WAREHOUSING = 14;


        //订单归档
        Integer ORDER_FILING = 15;


        //支付确认
        Integer PAYMENT_CONFIRMATION = 16;


        //支付取消
        Integer PAYMENT_FILING = 17;

        //订单销售发货单创建
        Integer SALES_INVOICE_ORDER = 18;

        //新增物流单
        Integer NEW_LOGISTICS_ORDER = 19;


        //订单发货确认
        Integer ORDER_DELIVERY_CONFIRMATION = 20;

        //新增采购入库单
        Integer ADD_PURCHASE_STOCK_DOCUMENT = 21;


        //订单收货确认
        Integer ORDER_RECEIPT_CONFIRMATION = 22;


        //确认回单
        Integer CONFIRM_COME_ORDER = 23;

        //订单归档供应商
        Integer ORDER_FILING_SUPPLIER = 23;
    }


    /**
     * 采购订单内部状态: -1 . 取消订单 1. 新增采购订单 2.审核订单(一级)
     * 3. 审核订单(二级) 4.提交订单  5.提交订单完成 6.审核订单(一级)不通过
     * 7.审核订单(二级)不通过
     * 8.确认电子合同 10.支付成功
     * 11.支付失败 12.确认收货
     * 14.订单入库  15.订单归档 16.订单入库 17.手工收货 0.完成订单
     *
     * @author wrc
     * @date 2020/8/26
     */
    public interface ProcurementOrderInteriorState {
        /**
         * 取消订单
         */
        Integer CANCEL_ORDER = -1;

        /**
         * 待新增采购订单
         */
        Integer ADD_ORDER = 1;

        /**
         * 待审核订单(一级)
         */
        Integer EXAMINE_ORDER_ONE = 2;

        /**
         * 待审核订单(二级)
         */
        Integer EXAMINE_ORDER_TWO = 3;

        /**
         * 待提交订单
         */
        Integer SUBMIT_ORDER = 4;

        /**
         * 待确认电子合同
         */
        Integer SUBMIT_ORDER_COMPLETE = 5;


        /**
         * 审核订单(一级)不通过
         */
        Integer EXAMINE_ORDER_ONE_NOT = 6;

        /**
         * 审核订单(二级)不通过
         */
        Integer EXAMINE_ORDER_TWO_NOT = 7;

        /**
         * 待支付订单
         */
        Integer PAY_ORDER = 8;

        /**
         * 支付成功
         */
        Integer PAY_SUCCESS = 10;

        /**
         * 支付失败
         */
        Integer PAY_ERROR = 11;


        /**
         * 12.待确认收货
         */
        Integer CONFIRM_RECEIPT = 12;


        /**
         * 14.订单待入库
         */
        Integer ORDER_WAREHOUSING = 14;



        /**
         * 15.订单待归档
         */
        Integer ORDER_FILING = 15;


        /**
         * 订单入库待审核
         */
        Integer EXAMINE_ORDER_WAREHOUSING = 16;


        /**
         * 待手工收货
         */
        Integer MANUAL_RECEIPT = 17;


        /**
         * 已完成
         */
        Integer ORDER_COMPLETE = 0;
    }

    /**
     * 销售单内部状态:
     * 1. 提交审核订单  2.审核订单(一级)
     * 3. 审核订单(二级) 4.确认订单
     * 5.接受订单 6.不接受订单
     * 7.审核订单(一级)不通过  8.审核订单(二级)不通过
     * 9.不接受订单 10.待确认支付结果
     * 16.支付结果确认到账 17.支付结果没到账
     * 18.订单销售发货单创建19.新增物流单
     * 20.订单发货确认 23.确认回单
     * 24.订单归档 25.待审核发货单
     * 26.手工确认发货 0.完成订单
     * @author wrc
     * @date 2020/8/26
     */
    public interface PurchaseOrderInteriorState {
        /**
         * 取消订单
         */
        Integer CANCEL_ORDER = -1;

        /**
         * 提交审核订单
         */
        Integer SUBMIT_AUDIT_ORDER = 1;

        /**
         * 审核订单(一级)
         */
        Integer EXAMINE_ORDER_ONE = 2;

        /**
         * 审核订单(二级)
         */
        Integer EXAMINE_ORDER_TWO = 3;

        /**
         * 确定订单
         */
        Integer ORDER_CONFIRMATION = 4;

        /**
         * 提交订单完成
         */
        Integer SUBMIT_ORDER_COMPLETE = 5;

        /**
         * 审核不通过
         */
        Integer EXAMINE_ORDER_NOT = 6;


        /**
         * 审核订单(一级)不通过
         */
        Integer EXAMINE_ORDER_ONE_NOT = 7;

        /**
         * 审核订单(二级)不通过
         */
        Integer EXAMINE_ORDER_TWO_NOT = 8;

        /**
         * 不接受订单
         */
        Integer ORDER_NOT_ACCEPTED = 9;


        /**
         * 10.待确认支付结果
         */
        Integer PAYMENT_RESULT_CONFIRMED = 10;


        /**
         * 16.支付结果确认到账
         */
        Integer PAYMENT_RESULT_CONFIRMED_ACCOUNT = 16;


        /**
         * 17.支付结果没到账
         */
        Integer THE_PAYMENT_RESULT_DIDN_ARRIVE = 17;


        /**
         * 18.待创建订单销售发货单创建
         */
        Integer ORDER_SALES_INVOICE_CREATION = 18;


        /**
         * 19.待新增物流单
         */
        Integer NEW_LOGISTICS_LIST = 19;


        /**
         * 20.待订单发货确认
         */
        Integer ORDER_DELIVERY_CONFIRMATION = 20;

        /**
         * 23.订单待回单
         */
        Integer ORDER_STAY_RECEIPT = 23;

        /**
         * 24.订单待归档
         */
        Integer ORDER_FILING = 24;


        /**
         * 25. 待审核发货单
         */
        Integer INVOICE_TO_BE_APPROVED = 25;


        /**
         * 27. 待手工发货
         */
        Integer MANUALLY_CONFIRM_RECEIPT = 27;


        /**
         * 已完成
         */
        Integer ORDER_COMPLETE = 0;



        /**
         * 28.不接受物流单
         */
        Integer NOT_LOGISTICS = 28;

        /**
         * 29.订单已归档-销售
         */
        Integer ORDER_FILING_ALREADY = 29;


        /**
         * 30.已手工发货
         */
        Integer DELIVERED_MANUALLY = 30;
    }


    /**
     * 采购订单外部状态:-1.取消订单
     * 1. 待提交订单
     * 2.待确认订单
     * 3.待确认电子合同
     * 4.订单待支付
     * 5.待确认支付结果
     * 6.待新增销售发货单
     * 7.待新增物流单
     * 8.订单发货待确认
     * 9.待新增采购入库单
     * 10.订单收货待确认
     * 11.待确认回单
     * 12.待订单归档 供应商
     * 13.待订单归档 采购商
     * 14.完成订单
     * 20.不接受订单
     * 21.确认没到账
     * 22.货品数量还没有全部发货重新发货
     *
     * @author wrc
     * @date 2020/8/26
     */
    public interface ProcurementOrderExternalState {

        /**
         * 取消订单
         */
        Integer CANCEL_ORDER = -1;
        /**
         * 待提交订单
         */
        Integer PLACE_ORDER = 1;
        /**
         * 待确认订单
         */
        Integer CONFIRM_ORDER = 2;
        /**
         * 待确认电子合同
         */
        Integer CONFIRMATION_ELECTRONIC_CONTRACT = 3;
        /**
         * 订单待支付
         */
        Integer ORDER_PAYMENT = 4;
        /**
         * 待确认支付结果
         */
        Integer CONFIRM_PAYMENT_RESULT = 5;
        /**
         * 待新增销售发货单
         */
        Integer ADD_SALES_INVOICE = 6;
        /**
         * 待新增物流单
         */
        Integer NEW_LOGISTICS_LIST = 7;
        /**
         * 订单发货待确认
         */
        Integer ORDER_DELIVERY_CONFIRMATION = 8;
        /**
         * 待新增采购入库单
         */
        Integer ADD_PURCHASE_STOCK_DOCUMENT = 9;
        /**
         * 订单收货待确认
         */
        Integer ORDER_RECEIPT_CONFIRMATION = 10;

        /**
         * 待确认回单
         */
        Integer CONFIRM_RECEIPT = 11;

        /**
         * 待订单归档
         */
        Integer ORDER_FILING = 12;

        /**
         * 待订单归档
         */
        Integer ORDER_FILING_BUYER = 13;

        /**
         * 完成订单
         */
        Integer COMPLETE_THE_ORDER = 14;

        /**
         * 不接受订单
         */
        Integer ORDER_NOT_ACCEPTED = 20;

        /**
         * 确认没到账
         */
        Integer CONFIRM_THAT_THE_ACCOUNT_HAS_NOT_ARRIVED = 21;

        /**
         * 货品数量还没有全部发货重新发货
         */
        Integer THE_QUANTITY_GOODS_HAS_NOT_BEEN_FULLY_DELIVERED_AND_DELIVERED = 22;


        /**
         * 23.待确认回单
         */
        Integer RECEIPT_CONFIRMED = 23;

        /**
         * 24.已确认回单
         */
        Integer CONFIRMED_RECEIPT = 24;

        /**
         * 新增销售发货单带审核
         */
        Integer TO_BE_REVIEWED = 25;

        /**
         * 物流单待审核
         */
        Integer LOGISTICS_LIST_TO_BE_REVIEWED = 26;





    }


    /**
     * 发货单详情内部状态
     *
     * @author wrc
     * @date 2020/9/15
     */
    public interface OrderDeliveryDetailsState {
        //新增销售发货单
        Integer ADD_SALES_INVOICE = 1;

        //新增物流单
        Integer ADD_LOGISTICS_ORDER = 2;

        //订单发货确认
        Integer CONFIRM_SHIPMENT = 3;

        //新增采购入库单
        Integer ADD_PURCHASE_STOCK_DOCUMENT = 4;

        //订单收货确认
        Integer ORDER_RECEIPT_CONFIRMATION = 5;

        //订单确认回单销售订单
        Integer ORDER_CONFIRMATION_RECEIPT_SALES = 6;
    }

    //采购订单内部订单审核步骤
    public interface ProcurementOrderStep {
        //提交审核
        Integer ADD_ORDER = 1;
        //审核订单(一级)
        Integer AUDIT_ORDER_ONE = 2;
        //审核订单(二级)
        Integer AUDIT_ORDER_TWO = 3;
        //提交订单
        Integer PLACE_ORDER = 4;


    }


    /**
     * 订单支付外部状态：1.待支付 2.待确认支付结果 3.确认到账 4.确认未到账
     *
     * @author wrc
     * @date 2020/9/23
     */
    public interface PayExternalState {
        //1.待支付
        Integer TO_BE_PAID = 1;
        //2.待确认支付结果
        Integer PAYMENT_RESULT_TO_BE_CONFIRMED = 2;
        //3.确认到账
        Integer CONFIRM_RECEIPT = 3;
        //4.确认未到账
        Integer CONFIRMATION_OF_NON_RECEIPT = 4;


    }

    /**
     *是否使用地市
     */
    public interface IsArea{
        boolean  YES=true;
        boolean  NOT=false;

    }


    /**
     *需求对接类型：1.发布至平台门户 2.系统匹配 3.指定供应会员
     */
    public interface DockingType{
        Integer PLATFORM_DOOR =1;
        Integer  MATCHING=2;
        Integer ASSIGN=3;
    }


    public interface IsMergeOrder{
        Boolean YES=true;
        Boolean NOT=false;


    }
}
